package com.cloud.pole.user.model.entity.account;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * @author 
 */
@Table(name="user_account_detail_type")
public class UserAccountDetailType implements Serializable {
    /**
     * 详单类型ID
     */
    @Id
    private Integer objectTypeId;

    /**
     * 类型名称
     */
    @NotEmpty
    private String typeName;

    /**
     * 状态（1：有效 0：无效）
     */
    @NotEmpty
    private Integer typeStatus;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 说明
     */
    private String typeDesc;
    
    /**
     * 方向（1：增加余额 -1：减少余额）
     */
    private Integer directionType;
    

    private static final long serialVersionUID = 1L;

    
    public Integer getDirectionType() {
		return directionType;
	}

	public void setDirectionType(Integer directionType) {
		this.directionType = directionType;
	}

	public Integer getObjectTypeId() {
        return objectTypeId;
    }

    public void setObjectTypeId(Integer objectTypeId) {
        this.objectTypeId = objectTypeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Integer getTypeStatus() {
        return typeStatus;
    }

    public void setTypeStatus(Integer typeStatus) {
        this.typeStatus = typeStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getTypeDesc() {
        return typeDesc;
    }

    public void setTypeDesc(String typeDesc) {
        this.typeDesc = typeDesc;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserAccountDetailType other = (UserAccountDetailType) that;
        return (this.getObjectTypeId() == null ? other.getObjectTypeId() == null : this.getObjectTypeId().equals(other.getObjectTypeId()))
            && (this.getTypeName() == null ? other.getTypeName() == null : this.getTypeName().equals(other.getTypeName()))
            && (this.getTypeStatus() == null ? other.getTypeStatus() == null : this.getTypeStatus().equals(other.getTypeStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getTypeDesc() == null ? other.getTypeDesc() == null : this.getTypeDesc().equals(other.getTypeDesc()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getObjectTypeId() == null) ? 0 : getObjectTypeId().hashCode());
        result = prime * result + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
        result = prime * result + ((getTypeStatus() == null) ? 0 : getTypeStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getTypeDesc() == null) ? 0 : getTypeDesc().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", objectTypeId=").append(objectTypeId);
        sb.append(", typeName=").append(typeName);
        sb.append(", typeStatus=").append(typeStatus);
        sb.append(", createTime=").append(createTime);
        sb.append(", typeDesc=").append(typeDesc);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}